Skip to content

Update go modules - #327

Merged
umputun merged 2 commits into
umputun:masterfrom
paskal:chore/deps-update
Aug 20, 2026
Merged

Update go modules#327
umputun merged 2 commits into
umputun:masterfrom
paskal:chore/deps-update

Conversation

@paskal

@paskal paskal commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Routine dependency refresh, go get -u -t ./... followed by go mod tidy and go mod vendor.

Direct:

module from to
github.com/charmbracelet/x/ansi v0.11.7 v0.11.8
github.com/mattn/go-runewidth v0.0.27 v0.0.28
github.com/stretchr/testify v1.11.1 v1.12.1

Indirect: dlclark/regexp2/v2 v2.2.1 → v2.7.1, lucasb-eyer/go-colorful v1.4.0 → v1.4.1, mattn/go-isatty v0.0.22 → v0.0.24, xo/terminfo to its first tagged release v1.0.0, golang.org/x/sys v0.43.0 → v0.47.0, golang.org/x/text v0.36.0 → v0.41.0.

The vendor tree churns more than usual because testify 1.12 vendors its own copies of spew and difflib and switches from gopkg.in/yaml.v3 to go.yaml.in/yaml/v3, so davecgh/go-spew, pmezard/go-difflib and gopkg.in/yaml.v3 drop out and go.yaml.in/yaml/v3 joins.

go 1.26 in go.mod and the CI go-version already match, so neither moves here. Full race suite and golangci-lint pass locally.

Direct: charmbracelet/x/ansi 0.11.7 -> 0.11.8, mattn/go-runewidth 0.0.27 ->
0.0.28, stretchr/testify 1.11.1 -> 1.12.1. Indirect: dlclark/regexp2/v2 2.2.1
-> 2.7.1, lucasb-eyer/go-colorful 1.4.0 -> 1.4.1, mattn/go-isatty 0.0.22 ->
0.0.24, xo/terminfo to its first tagged release 1.0.0, golang.org/x/sys 0.43.0
-> 0.47.0, golang.org/x/text 0.36.0 -> 0.41.0.

testify 1.12 vendors its own copies of spew and difflib and switches from
gopkg.in/yaml.v3 to go.yaml.in/yaml/v3, so go-spew, go-difflib and
gopkg.in/yaml.v3 drop out of the vendor tree and go.yaml.in/yaml/v3 joins it.
Copilot AI lite review requested due to automatic review settings August 19, 2026 15:59
@paskal
paskal requested a review from umputun as a code owner August 19, 2026 15:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Routine Go dependency refresh for revdiff, updating direct and indirect modules and re-vendoring to keep the repository’s vendor tree and module metadata consistent.

Changes:

  • Bump direct dependencies: github.com/charmbracelet/x/ansi → v0.11.8, github.com/mattn/go-runewidth → v0.0.28, github.com/stretchr/testify → v1.12.1.
  • Refresh indirect dependencies including golang.org/x/sys, golang.org/x/text, github.com/dlclark/regexp2/v2, github.com/xo/terminfo, and YAML module migration to go.yaml.in/yaml/v3.
  • Update vendor/ contents and vendor/modules.txt to match the resolved module graph.

Reviewed changes

Copilot reviewed 1 out of 182 changed files in this pull request and generated no comments.

Show a summary per file
File Description
vendor/modules.txt Vendor manifest updated for new module versions and YAML module switch.
vendor/gopkg.in/yaml.v3/README.md Removed vendored README as gopkg.in/yaml.v3 is no longer in the vendor set.
vendor/golang.org/x/sys/windows/types_windows.go Vendored x/sys update: Windows types/constants additions and documentation tweaks.
vendor/golang.org/x/sys/windows/security_windows.go Vendored x/sys update: clarifies unsafe TrusteeValue pointer lifetime/pinning requirements.
vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go Vendored x/sys update: linux/sparc64 type/const additions.
vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go Vendored x/sys update: linux/s390x type/const additions.
vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go Vendored x/sys update: linux/riscv64 type/const additions.
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go Vendored x/sys update: linux/ppc64le type/const additions.
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go Vendored x/sys update: linux/ppc64 type/const additions.
vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go Vendored x/sys update: linux/ppc type/const additions.
vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go Vendored x/sys update: linux/mipsle type/const additions.
vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go Vendored x/sys update: linux/mips64le type/const additions.
vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go Vendored x/sys update: linux/mips64 type/const additions.
vendor/golang.org/x/sys/unix/ztypes_linux_mips.go Vendored x/sys update: linux/mips type/const additions.
vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go Vendored x/sys update: linux/loong64 type/const additions.
vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go Vendored x/sys update: linux/arm64 type/const additions.
vendor/golang.org/x/sys/unix/ztypes_linux_arm.go Vendored x/sys update: linux/arm type/const additions.
vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go Vendored x/sys update: linux/amd64 type/const additions.
vendor/golang.org/x/sys/unix/ztypes_linux_386.go Vendored x/sys update: linux/386 type/const additions.
vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go Vendored x/sys update: linux/sparc64 syscall number additions.
vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go Vendored x/sys update: linux/s390x syscall number additions.
vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go Vendored x/sys update: linux/riscv64 syscall number additions.
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go Vendored x/sys update: linux/ppc64le syscall number additions.
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go Vendored x/sys update: linux/ppc64 syscall number additions.
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go Vendored x/sys update: linux/ppc syscall number additions.
vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go Vendored x/sys update: linux/mipsle syscall number additions.
vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go Vendored x/sys update: linux/mips64le syscall number additions.
vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go Vendored x/sys update: linux/mips64 syscall number additions.
vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go Vendored x/sys update: linux/mips syscall number additions.
vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go Vendored x/sys update: linux/loong64 syscall number additions.
vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go Vendored x/sys update: linux/arm64 syscall number additions.
vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go Vendored x/sys update: linux/arm syscall number additions.
vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go Vendored x/sys update: linux/amd64 syscall number additions.
vendor/golang.org/x/sys/unix/zsysnum_linux_386.go Vendored x/sys update: linux/386 syscall number additions.
vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s Vendored x/sys update: OpenBSD/riscv64 trampolines for vectored IO.
vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go Vendored x/sys update: OpenBSD/riscv64 readv/writev/preadv/pwritev syscalls.
vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s Vendored x/sys update: OpenBSD/ppc64 trampolines for vectored IO.
vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go Vendored x/sys update: OpenBSD/ppc64 readv/writev/preadv/pwritev syscalls.
vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s Vendored x/sys update: OpenBSD/mips64 trampolines for vectored IO.
vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go Vendored x/sys update: OpenBSD/mips64 readv/writev/preadv/pwritev syscalls.
vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s Vendored x/sys update: OpenBSD/arm64 trampolines for vectored IO.
vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go Vendored x/sys update: OpenBSD/arm64 readv/writev/preadv/pwritev syscalls.
vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s Vendored x/sys update: OpenBSD/arm trampolines for vectored IO.
vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go Vendored x/sys update: OpenBSD/arm readv/writev/preadv/pwritev syscalls.
vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s Vendored x/sys update: OpenBSD/amd64 trampolines for vectored IO.
vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go Vendored x/sys update: OpenBSD/amd64 readv/writev/preadv/pwritev syscalls.
vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s Vendored x/sys update: OpenBSD/386 trampolines for vectored IO.
vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go Vendored x/sys update: OpenBSD/386 readv/writev/preadv/pwritev syscalls.
vendor/golang.org/x/sys/unix/zsyscall_linux.go Vendored x/sys update: consolidated Linux epoll wait wrapper and syscall helper renames.
vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go Vendored x/sys update: removes per-arch EpollWait in favor of shared implementation.
vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go Vendored x/sys update: removes per-arch EpollWait in favor of shared implementation.
vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go Vendored x/sys update: removes per-arch EpollWait in favor of shared implementation.
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go Vendored x/sys update: removes per-arch EpollWait in favor of shared implementation.
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go Vendored x/sys update: removes per-arch EpollWait in favor of shared implementation.
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go Vendored x/sys update: removes per-arch EpollWait in favor of shared implementation.
vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go Vendored x/sys update: removes per-arch EpollWait in favor of shared implementation.
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go Vendored x/sys update: removes per-arch EpollWait in favor of shared implementation.
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go Vendored x/sys update: removes per-arch EpollWait in favor of shared implementation.
vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go Vendored x/sys update: removes per-arch EpollWait in favor of shared implementation.
vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go Vendored x/sys update: removes per-arch EpollWait in favor of shared implementation.
vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go Vendored x/sys update: removes per-arch EpollWait in favor of shared implementation.
vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go Vendored x/sys update: removes per-arch EpollWait in favor of shared implementation.
vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go Vendored x/sys update: removes per-arch EpollWait in favor of shared implementation.
vendor/golang.org/x/sys/unix/zsyscall_linux_386.go Vendored x/sys update: removes per-arch EpollWait in favor of shared implementation.
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go Vendored x/sys update: adds/renames Linux error constants for sparc64.
vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go Vendored x/sys update: adds/renames Linux error constants for s390x.
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go Vendored x/sys update: adds/renames Linux error constants for ppc64le.
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go Vendored x/sys update: adds/renames Linux error constants for ppc64.
vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go Vendored x/sys update: adds/renames Linux error constants for ppc.
vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go Vendored x/sys update: adds/renames Linux error constants for mipsle.
vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go Vendored x/sys update: adds/renames Linux error constants for mips64le.
vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go Vendored x/sys update: adds/renames Linux error constants for mips64.
vendor/golang.org/x/sys/unix/zerrors_linux_mips.go Vendored x/sys update: adds/renames Linux error constants for mips.
vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go Vendored x/sys update: adds/renames Linux error constants for loong64.
vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go Vendored x/sys update: adds/renames Linux error constants for arm64.
vendor/golang.org/x/sys/unix/zerrors_linux_arm.go Vendored x/sys update: adds/renames Linux error constants for arm.
vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go Vendored x/sys update: adds/renames Linux error constants for amd64.
vendor/golang.org/x/sys/unix/zerrors_linux_386.go Vendored x/sys update: adds/renames Linux error constants for 386.
vendor/golang.org/x/sys/unix/syscall_openbsd.go Vendored x/sys update: adds vectored IO syscalls to OpenBSD syscall list.
vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go Vendored x/sys update: removes per-arch EpollWait syscall directive.
vendor/golang.org/x/sys/unix/syscall_linux_s390x.go Vendored x/sys update: removes per-arch EpollWait syscall directive.
vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go Vendored x/sys update: removes per-arch EpollWait and fixes Utime(nil) behavior.
vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go Vendored x/sys update: removes per-arch EpollWait syscall directive.
vendor/golang.org/x/sys/unix/syscall_linux_ppc.go Vendored x/sys update: removes per-arch EpollWait syscall directive.
vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go Vendored x/sys update: removes per-arch EpollWait syscall directive.
vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go Vendored x/sys update: removes per-arch EpollWait syscall directive.
vendor/golang.org/x/sys/unix/syscall_linux_loong64.go Vendored x/sys update: removes per-arch EpollWait and fixes Utime(nil) behavior.
vendor/golang.org/x/sys/unix/syscall_linux_arm64.go Vendored x/sys update: removes per-arch EpollWait and fixes Utime(nil) behavior.
vendor/golang.org/x/sys/unix/syscall_linux_arm.go Vendored x/sys update: removes per-arch EpollWait and fixes Utime(nil) behavior.
vendor/golang.org/x/sys/unix/syscall_linux_amd64.go Vendored x/sys update: removes per-arch EpollWait syscall directive.
vendor/golang.org/x/sys/unix/syscall_linux_386.go Vendored x/sys update: removes per-arch EpollWait syscall directive.
vendor/golang.org/x/sys/unix/syscall_darwin.go Vendored x/sys update: moves Readv/Writev helpers into shared file.
vendor/golang.org/x/sys/unix/readv_unix.go Vendored x/sys update: shared Readv/Writev/Preadv/Pwritev implementations for darwin/linux/openbsd.
vendor/golang.org/x/sys/unix/mkerrors.sh Vendored x/sys update: generator script tweaks for newer kernel header changes.
vendor/golang.org/x/sys/unix/mkall.sh Vendored x/sys update: docker run uses --rm for generator container cleanup.
vendor/go.yaml.in/yaml/v3/yamlprivateh.go Vendored YAML v3 update under go.yaml.in: formatting and minor internal logic adjustments.
vendor/go.yaml.in/yaml/v3/yamlh.go Vendored YAML v3 update: comment formatting and emitter struct field addition.
vendor/go.yaml.in/yaml/v3/yaml.go Vendored YAML v3 update: repo URL update and new encoder sequence-indent helpers.
vendor/go.yaml.in/yaml/v3/writerc.go Vendored YAML v3 update: header comment formatting normalization.
vendor/go.yaml.in/yaml/v3/sorter.go Vendored YAML v3 update: new key-sorting implementation file.
vendor/go.yaml.in/yaml/v3/scannerc.go Vendored YAML v3 update: comment formatting and small spacing fixes.
vendor/go.yaml.in/yaml/v3/readerc.go Vendored YAML v3 update: header comment formatting normalization.
vendor/go.yaml.in/yaml/v3/NOTICE Vendored YAML v3 update: adds NOTICE file.
vendor/go.yaml.in/yaml/v3/LICENSE Vendored YAML v3 update: adds license file(s) matching upstream packaging.
vendor/go.yaml.in/yaml/v3/decode.go Vendored YAML v3 update: safer handling for possibly-unhashable merge keys.
vendor/go.yaml.in/yaml/v3/apic.go Vendored YAML v3 update: header comment formatting normalization.
vendor/github.com/xo/terminfo/dec.go Vendored terminfo update: increases max terminfo file length.
vendor/github.com/stretchr/testify/require/requirements.go Vendored testify update: function type aliases for assertion func types.
vendor/github.com/stretchr/testify/require/require.go.tmpl Vendored testify update: template comment generation change.
vendor/github.com/stretchr/testify/require/require_forward.go.tmpl Vendored testify update: template comment generation change (forward methods).
vendor/github.com/stretchr/testify/require/doc.go Vendored testify update: doc wording adjustments and reference to testing.T.FailNow.
vendor/github.com/stretchr/testify/internal/spew/README.md Vendored testify update: adds internal spew README.
vendor/github.com/stretchr/testify/internal/spew/LICENSE Vendored testify update: adds internal spew license.
vendor/github.com/stretchr/testify/internal/spew/dump.go Vendored testify update: documentation formatting changes.
vendor/github.com/stretchr/testify/internal/spew/config.go Vendored testify update: documentation formatting changes.
vendor/github.com/stretchr/testify/internal/spew/bypasssafe.go Vendored testify update: adds go:build line for build tags.
vendor/github.com/stretchr/testify/internal/spew/bypass.go Vendored testify update: adds go:build line for build tags.
vendor/github.com/stretchr/testify/internal/difflib/LICENSE Vendored testify update: newline/formatting normalization.
vendor/github.com/stretchr/testify/assert/yaml/yaml_fail.go Vendored testify update: YAML module path reference updated to go.yaml.in/yaml/v3.
vendor/github.com/stretchr/testify/assert/yaml/yaml_default.go Vendored testify update: YAML module path switched to go.yaml.in/yaml/v3.
vendor/github.com/stretchr/testify/assert/yaml/yaml_custom.go Vendored testify update: YAML module path reference updated to go.yaml.in/yaml/v3.
vendor/github.com/stretchr/testify/assert/doc.go Vendored testify update: docs formatting and godoc link formatting.
vendor/github.com/stretchr/testify/assert/assertion_order.go Vendored testify update: improved failure reporting and helper marking for ordered assertions.
vendor/github.com/stretchr/testify/assert/assertion_format.go Vendored testify update: doc wording/formatting improvements and expanded YAML docs.
vendor/github.com/mattn/go-runewidth/runewidth_posix.go Vendored go-runewidth update: removes regexp parsing; uses manual locale charset parsing.
vendor/github.com/mattn/go-isatty/isatty_tiocgwinsz.go Vendored go-isatty update: uses TIOCGWINSZ ioctl for safer terminal detection.
vendor/github.com/mattn/go-isatty/isatty_others.go Vendored go-isatty update: adds haiku to non-windows “others” build tag set.
vendor/github.com/lucasb-eyer/go-colorful/widegamut.go Vendored go-colorful update: corrected D50↔D65 conversion matrix values.
vendor/github.com/lucasb-eyer/go-colorful/CHANGELOG.md Vendored go-colorful update: changelog entry for 1.4.1.
vendor/github.com/dlclark/regexp2/v2/syntax/prefixanalyzer.go Vendored regexp2 update: adds grapheme handling and set safety checks/copies.
vendor/github.com/dlclark/regexp2/v2/syntax/prefix.go Vendored regexp2 update: grapheme node handling in first-char derivation.
vendor/github.com/dlclark/regexp2/v2/syntax/optimizations.go Vendored regexp2 update: optimization struct changes and prefix-first-rune precompute.
vendor/github.com/dlclark/regexp2/v2/syntax/code.go Vendored regexp2 update: new ops/tables and quick-code metadata support.
vendor/github.com/dlclark/regexp2/v2/syntax/charclass.go Vendored regexp2 update: case equivalence handling changes and canonicalization.
vendor/github.com/dlclark/regexp2/v2/stringprefixfilter.go Vendored regexp2 update: adds fixed-distance set scanning for string prefix filtering.
vendor/github.com/dlclark/regexp2/v2/split.go Vendored regexp2 update: fixes split to operate on original string byte spans.
vendor/github.com/dlclark/regexp2/v2/regexp_codegen.go Vendored regexp2 update: adds quick execution hooks and left-context slicing metadata.
vendor/github.com/dlclark/regexp2/v2/options.go Vendored regexp2 update: adds max backtracking stack size optimization option.
vendor/github.com/dlclark/regexp2/v2/match.go Vendored regexp2 update: capture offsets now refer to original input; zero-alloc String for string input.
vendor/github.com/dlclark/regexp2/v2/helpers/searchvalues.go Vendored regexp2 update: implements previously unimplemented search helper methods.
vendor/github.com/dlclark/regexp2/v2/helpers/ascii.go Vendored regexp2 update: adds ASCII fast-path helpers for scanning/decoding.
vendor/github.com/charmbracelet/x/ansi/width.go Vendored x/ansi update: adds utf8 fast-path for wcwidth-based measurement.
vendor/github.com/charmbracelet/x/ansi/wcwidth.go Vendored x/ansi update: new wcwidth implementation with zero-width fast paths.
vendor/github.com/charmbracelet/x/ansi/parser/transition_table.go Vendored x/ansi update: gosec nolint annotations for byte conversions in loops.
vendor/github.com/charmbracelet/x/ansi/parser_decode.go Vendored x/ansi update: wcwidth cluster width computation changes and gosec nolint annotations.
vendor/github.com/charmbracelet/x/ansi/mouse.go Vendored x/ansi update: gosec nolint annotation for byte-to-string conversions in escape building.
vendor/github.com/charmbracelet/x/ansi/color.go Vendored x/ansi update: minor formatting/annotation changes in 256-color conversion.
go.mod Updates module requirements to the refreshed dependency set (direct + indirect).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

go.mod keeps this branch's newer testify 1.12.1 and regexp2 2.7.1. go.sum and
vendor are regenerated with go mod tidy and go mod vendor rather than
hand-merged, since master landed overlapping vendor churn.
@umputun
umputun merged commit b076ce9 into umputun:master Aug 20, 2026
2 checks passed
umputun added a commit that referenced this pull request Aug 20, 2026
…#330)

* fix(highlight): raise regexp2 backtracking cap so long tokens keep their color

regexp2 v2.7.1 added a default MaxBacktrackingStackSize of 100000 that did not
exist in v2.2.1. Chroma compiles every lexer rule with a bare regexp2.Compile
and its matchRules drops results whose match returned an error, so a rule that
trips the cap degrades to a non-match with nothing logged. A Go string literal
over roughly 17k characters was repainted as chroma.Error, and revdiff could
not see it because highlightFile only checks the error Tokenise itself returns.

Raise the package default from New(), which is the only route into chroma's
deferred rule compilation. The cap stays finite rather than going back to
unbounded: revdiff opens arbitrary repos and 2.7.1 added the bound for a
reason. Multi-megabyte tokens still exceed it, and the comment says so.

regexp2 moves from indirect to direct in go.mod as a result.

* docs(backlog): refresh the race timeout measurements

re-measured during the PR #327 review: the app package now runs 81.5s and 87.5s
on master against 68s before, so headroom against the 100s budget is down from
roughly 32s to roughly 13s. Still later rather than yes, but the next addition
to the launcher matrix is what flips it.

* fix(highlight): lower the backtracking cap to 1m and correct its comment

10m covered roughly 1.7M characters, far past anything revdiff needs, and the
cost was not free. growTrack doubles until it reaches the cap, so the steps
before ErrBacktrackingStackLimit scale with it, while chroma sets a separate
250ms MatchTimeout on every rule and discards that error through the same
err == nil gate. A cap that large turns a sub-millisecond abort into a stall of
up to a quarter second on the bubbletea event loop, which themeselect hits on
every keypress that changes the chroma style.

The chroma Go quoted-string rule needs 240045 slots for the 40k test input, so
1m keeps about four times headroom and still fixes the regression.

Comment corrections that go with it: slots are ints, so 1m is about 8MB on
64-bit; the cap bounds runtrack only, since runstack grows through
doubleIntSlice with no limit check, so the two together reach roughly twice the
nominal budget; and the 250ms timeout is a second independent ceiling that
raising this constant cannot help. New's godoc now names the process-wide
change to regexp2.DefaultOptimizationOptions.
@paskal
paskal deleted the chore/deps-update branch August 20, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants